import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { ServerService } from './server.service';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { RequirePermission } from 'src/decorator/reuqire-permission';

@Controller('server')
@ApiTags('服务监控')
@ApiBearerAuth()
export class ServerController {
  constructor(private readonly serverService: ServerService) {}

  @Get()
  @ApiOperation({summary:'获取服务器系统信息'})
  @RequirePermission("monitor:server:list")
  serverInfo() {
    return this.serverService.serverInfo();
  }

}
